package com.joysuch.wwyt.workflow.entity;


import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * <p>
 * 
 * </p>
 *
 * @author zero
 * @since 2021-10-25
 */

@Data
@Table( name = "wwyt_workflow_watermark_settings")
@Entity
@ApiModel(value="WorkflowWatermarksettings对象", description="")
@SQLDelete(sql="update wwyt_workflow_watermark_settings set delete_flag = '1' where id= ?")
@SQLDeleteAll(sql="update wwyt_workflow_watermark_settings set delete_flag = '1' where id= ?")
@Where(clause="delete_flag = '0'")
@EntityListeners({AuditingEntityListener.class, AutoSetCommonFieldListener.class})
public class WorkflowWatermarkSettings implements Serializable {

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty(value = "流程id")
    private Long workflowId;
    
    @ApiModelProperty(value = "固定水印, 0:根据字段动态变化")
    private Integer fixedWatermark;

    @ApiModelProperty(value = "动态字段的key")
    private String dynamicFieldKey;
    
    @ApiModelProperty(value = "动态字段")
    private String dynamicField;

    @ApiModelProperty(value = "水印类型,0:图片类型")
    private Integer  watermarkType;

    //租户
    private Long tenentId;
    //组织机构代码
    private String orgCode;
    //创建人
    @org.springframework.data.annotation.CreatedBy
    private Long createBy;
    //创建时间
    @org.springframework.data.annotation.CreatedDate
    private Date createTime;
    //更新人
    @org.springframework.data.annotation.LastModifiedBy
    private Long updateBy;
    //更新时间
    @org.springframework.data.annotation.LastModifiedDate
    private Date updateTime;
    //删除标记
    private String deleteFlag;
    
}
